/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-09-03
 * Time: 22:20
 */
public class Test {
    /**
     * Created with IntelliJ IDEA.
     * Description:
     * User:
     * Date: 2024-08-29
     * Time: 16:07
     */
    public class Test {
        public static void main(String[] args) {
            BinaryTree binaryTree = new BinaryTree();
            BinaryTree.TreeNode root = binaryTree.createTree();

            binaryTree.preOrder(root);
            System.out.println();
            binaryTree.inOrder(root);
            System.out.println();
            binaryTree.postOrder(root);
            System.out.println();

            //binaryTree.size2(root);
            binaryTree.getLeafNodeCount1(root);
            System.out.println("节点个数：" + binaryTree.size2(root));

            System.out.println("叶子节点个数：" + binaryTree.getLeafNodeCount1(root));
        }
    }

}
